import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui';
import axios from 'axios';
import 'element-ui/lib/theme-chalk/index.css';

//  自定义指令 start
import Throttling from '../src/customInstruction/Throttling.js';
import Debounce from './customInstruction/Debounce.js';
import Tablerowdrag from './customInstruction/Tablerowdrag.js';
import Drag from './customInstruction/Drag.js';

//  自定义指令 end
Vue.config.productionTip = false;
Vue.use(ElementUI);

Vue.prototype.$Axios = axios;

// 设置v-throttling 节流-自定义指令
Vue.directive('throttling', Throttling);
// 设置v-debounce 防抖-自定义指令
Vue.directive('debounce', Debounce);
//设置 v-tablerowdrag 表格行拖动排序-自定义指令
Vue.directive('tablerowdrag', Tablerowdrag);
//设置 v-drag 拖动-自定义指令
Vue.directive('drag', Drag);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
